package org.index.outofbounds;

public class OutofBounds {
	public static void main(String[] args) {
		String s ="my name is rao";
		int i = 0;
		try {
			while(true){
				s.charAt(i);
				i++;
			}
			
		} catch (IndexOutOfBoundsException e) {
			System.out.println(i);
			
		}
		
	}

}
